package com.yuantong.xyerp.core.api.model;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 银行流水表/账户明细
 * </p>
 *
 * @author JianguoYin
 * @since 2021-08-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CashFlow对象", description="银行流水表/账户明细")
public class CashFlow implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "36位UUID主键")
    private String id;

    @ApiModelProperty(value = "单据编号: 收付款单据编号，自动生成：")
    @Excel(name = "关联单据",orderNum = "2",width = 40.0)
    private String docNo;

    @ApiModelProperty(value = "C-合同；F-运费；O-其他")
    private String purpose;

    @ApiModelProperty(value = "业务类型: 0-账户初期；1-采购预付；2-采购结算；3-销售预售；4-销售结算；5-账户修正;")
    @Excel(name = "业务类型",replace = { "账户初期_0", "采购预付_1", "采购结算_2", "销售预售_3", "销售结算_4", "账户修正_5" },orderNum = "3")
    private String type;

    @ApiModelProperty(value = "关联单据id")
    private String associationId;

    @ApiModelProperty(value = "账户id")
    private String accountId;

    @ApiModelProperty(value = "往来单位名称: 往来单位id")
    private String merchantId;

    @ApiModelProperty(value = "往来单位名称")
    @Excel(name = "往来单位名称",orderNum = "4",width = 40.0)
    private String merchantName;

    @ApiModelProperty(value = "往来单位银行")
    private String merchantBank;

    @ApiModelProperty(value = "收付款帐号: 往来单位账号")
    @Excel(name = "收付款账号",orderNum = "5",width = 40.0)
    private String merchantNumber;

    @ApiModelProperty(value = "往来单位地址")
    private String merchantAddress;

    @ApiModelProperty(value = "收付款金额: 金额（正为收入，负为支出）")
    @Excel(name = "收付款金额",orderNum = "6",width = 25)
    private BigDecimal amount;

    @ApiModelProperty(value = "说明")
    @Excel(name = "备注",orderNum = "7",width = 40.0)
    private String remarks;

    @ApiModelProperty(value = "最近修改时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间",format = "yyyy-MM-dd",orderNum = "1",width = 40.0)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    private String creatorId;

    @ApiModelProperty(value = "流水确认时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;

    @ApiModelProperty(value = "审核人id")
    private String confirmerId;

    @ApiModelProperty(value = "审核说明")
    private String confirmRemark;

    @ApiModelProperty(value = "收付款状态：0-保存，1-提交审核，2-通过，-1-驳回")
    private String status;

}
